import { Table, Pagination } from 'antd';

import { context } from '../index';
import { useContext } from 'react';

const Index = () => {
  const { dataSource, columns, current, total, paginationChange }: any =
    useContext(context);
  return (
    <>
      <Table dataSource={dataSource} columns={columns} pagination={false} />
      <Pagination
        current={current}
        total={total}
        style={{ marginTop: 10, display: 'flex', justifyContent: 'flex-end' }}
        onChange={paginationChange}
      />
    </>
  );
};

export default Index;
